#pragma once
#include <vulkan/vulkan_core.h>
#include <iostream>
#include <fstream>
#include <cstring>

const int VERTEX_POSITION_SIZE = 4;
const int VERTEX_COLOR_SIZE = 4;
const int VERTEX_TEXCOORD_SIZE = 2;
const int COLOR_SIZE = 4;
struct Vertex
{
	float position[VERTEX_POSITION_SIZE];
	float color[VERTEX_COLOR_SIZE];
	// float texCoord[VERTEX_TEXCOORD_SIZE];
};

struct PushConstants {
    float defaultColor[COLOR_SIZE];
};

struct QueueFamilyIndices
{
	// 支持图像绘制的队列
	uint32_t graphicsFamily = -1;

	// 支持图形呈现的队列
	uint32_t presentFamily = -1;

	bool isComplete()
	{
		return (graphicsFamily >= 0) && (presentFamily >= 0);
	}
};
const int MAX_FRAMES_IN_FLIGHT = 2;

// 查询并记录交换链支持的细节
struct SwapChainSupportDetails
{
	VkSurfaceCapabilitiesKHR capabilities;		// 基础表面特性
	std::vector<VkSurfaceFormatKHR> formats;	// 像素格式、色彩空间
	std::vector<VkPresentModeKHR> presentModes; // 可用的呈现模式
};

enum class CE_VulkanObjectTypeE
{
	DEFAULT,
    UI,
    MODEL,
};
